<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

    <div class="box">
        <p>
            <span></span>
        </p>
    </div>


    <script>

        // 父元素和父节点 都得到父元素
        //  parentNode     父节点
        //  parentElement  父元素


        var oSpan = document.querySelector('span');
        console.log(oSpan.parentElement);
        console.log(oSpan.parentNode);

        console.log(oSpan.parentElement.parentElement);

    </script>

</body>

</html>